package com.mhy.book.app;

import com.mhy.book.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringIocMain {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("beans.xml");

        BookService bookService = (BookService) ac.getBean("bookService");


        bookService.queryBook();
    }
}
